{% extends 'VipBundle:VipAdmin:layout.html.twig' %}

{% block title %}会员专区设置 - {{ parent() }}{% endblock %}

{% set menu = 'setting' %}

{% block main %}

{{ web_macro.flash_messages() }}

  <div class="page-header clearfix">
    <h1 class="pull-left">会员专区设置</h1>
  </div>

<form class="form-horizontal" method="post" id="member-zone-form" novalidate>
  <div class="row form-group">
    <div class="col-md-2 control-label">
      <label >专区状态</label>
    </div>
    <div class="controls col-md-7 radios">
      {{ radios('enabled', {1:'开启', 0:'关闭'}, vipSetting.enabled|default(1)) }}
    </div>
  </div>


  <div class="row form-group">
    <div class="col-md-2 control-label">
      <label for="upgradeLimit">会员升级限制</label>
    </div>
    <div class="controls col-md-5">
      过期日期前的 <input type="text" id="upgradeMinDay" name="upgrade_min_day" required="required" class="form-control width-input width-input-mini" value="{{ vipSetting.upgrade_min_day|default(30) }}" data-widget-cid="widget-3"> 天内无法升级，只能先续费再升级
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-2 control-label">
      <label >专区顶部编辑区</label>
    </div>
    <div class="controls col-md-7">
      <a href="javascript:;" class="btn btn-link update-btn" data-url="{{ path('admin_block_update', { block: "vip_banner" }) }}" data-toggle="modal" data-target="#modal">编辑内容</a>
    </div>
  </div>

  <div class="row form-group">
    <div class="col-md-2 control-label"></div>
    <div class="controls col-md-8">
      <button type="submit" class="btn btn-primary">提交</button>  
    </div>
  </div>

  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
</form>

{% endblock %}
